package com.hl.sfzy.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 
 * @TableName course_reply
 */
public class CourseReply {
    /**
     * 编号
     */
    private Integer courseReplyId;

    /**
     * 回复内容
     */
    private String courseReplyText;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date courseReplyCreateTime;

    /**
     * 交流编号
     */
    private Integer courseTalkId;

    /**
     * 用户编号
     */
    private Integer userId;

    /**
     * 编号
     */
    public Integer getCourseReplyId() {
        return courseReplyId;
    }

    /**
     * 编号
     */
    public void setCourseReplyId(Integer courseReplyId) {
        this.courseReplyId = courseReplyId;
    }

    /**
     * 回复内容
     */
    public String getCourseReplyText() {
        return courseReplyText;
    }

    /**
     * 回复内容
     */
    public void setCourseReplyText(String courseReplyText) {
        this.courseReplyText = courseReplyText;
    }

    /**
     * 创建时间
     */
    public Date getCourseReplyCreateTime() {
        return courseReplyCreateTime;
    }

    /**
     * 创建时间
     */
    public void setCourseReplyCreateTime(Date courseReplyCreateTime) {
        this.courseReplyCreateTime = courseReplyCreateTime;
    }

    /**
     * 交流编号
     */
    public Integer getCourseTalkId() {
        return courseTalkId;
    }

    /**
     * 交流编号
     */
    public void setCourseTalkId(Integer courseTalkId) {
        this.courseTalkId = courseTalkId;
    }

    /**
     * 用户编号
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 用户编号
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CourseReply other = (CourseReply) that;
        return (this.getCourseReplyId() == null ? other.getCourseReplyId() == null : this.getCourseReplyId().equals(other.getCourseReplyId()))
            && (this.getCourseReplyText() == null ? other.getCourseReplyText() == null : this.getCourseReplyText().equals(other.getCourseReplyText()))
            && (this.getCourseReplyCreateTime() == null ? other.getCourseReplyCreateTime() == null : this.getCourseReplyCreateTime().equals(other.getCourseReplyCreateTime()))
            && (this.getCourseTalkId() == null ? other.getCourseTalkId() == null : this.getCourseTalkId().equals(other.getCourseTalkId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCourseReplyId() == null) ? 0 : getCourseReplyId().hashCode());
        result = prime * result + ((getCourseReplyText() == null) ? 0 : getCourseReplyText().hashCode());
        result = prime * result + ((getCourseReplyCreateTime() == null) ? 0 : getCourseReplyCreateTime().hashCode());
        result = prime * result + ((getCourseTalkId() == null) ? 0 : getCourseTalkId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", courseReplyId=").append(courseReplyId);
        sb.append(", courseReplyText=").append(courseReplyText);
        sb.append(", courseReplyCreateTime=").append(courseReplyCreateTime);
        sb.append(", courseTalkId=").append(courseTalkId);
        sb.append(", userId=").append(userId);
        sb.append("]");
        return sb.toString();
    }
}